<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Vue</title>
  <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<div id="app">
  <div id="counter">
    <button v-on:click="counter += 1">点击次数加1</button>
    <p>你已经点了 {{ counter }} 次了</p>
  </div>
</div>
<script>
  new Vue({
    el: '#counter',
    data: {
      counter: 0
    }
  })
</script>
</body>
</html>